package cfdt.common.jwt;

import cn.hutool.core.util.StrUtil;
import cfdt.common.enums.AlgorithmEnum;

/**
 * JWT头对象
 * 源码来自于CFCA无纸化，重构了JWT依赖源码
 */
public class JwtHeader {

    public static final String ALGORITHM = "algName";

    private String algName = AlgorithmEnum.SM3.getValue();

    public String getAlgName() {
        return this.algName;
    }

    public void setAlgName(String algName) {
        if (StrUtil.isEmpty(algName)) {
            throw new IllegalArgumentException("algName is null");
        } else {
            this.algName = algName;
        }
    }

}
